home *** CD-ROM | disk | FTP | other *** search
- Path: classic.iinet.com.au!news
- From: ng@mitswa.com.au (John A Ng)
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Performance: C vs. C++
- Date: Fri, 19 Jan 1996 09:52:50 GMT
- Organization: MITS (WA)
- Message-ID: <4dnpl2$c8g@classic.iinet.com.au>
- References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net>
- NNTP-Posting-Host: grunge163.nv.iinet.net.au
- X-Newsreader: Forte Free Agent 1.0.82
-
- David Byrden <100101.2547@compuserve.com> wrote:
-
-
- >Steve;
-
- >C and C++ are so similar that I would expect similar code to produce
- >almost identical performance. However, note that while virtual functions
- >cause overhead when you use them, exceptions in most present compilers can
- >cause overhead *at every function call*.
-
- > David
-
-
- Not quite. C is quite different from C++ from the performance point of
- view. The difference is not only in virtual functions and exceptions
- but in class construction, destruction, etc... and most significantly in
- Runtime Type Checking. However, because machines are getting faster by
- the day, this sort of "inefficiency" is hardly noticable.
- Regards,
-
- John Ng
- ng@mitswa.com.au
- Western Australia
-
-